package org.zju.demo.shoppingdemo.application;

import com.orm.SugarApp;

import net.tsz.afinal.FinalBitmap;
import net.tsz.afinal.utils.Utils;

import org.zju.demo.shoppingdemo.R;
import org.zju.demo.shoppingdemo.model.Product;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by ZJDX on 2015/9/13.
 */
public class ShoppingApplication extends SugarApp{
    private FinalBitmap fb;
    private String username;
    private List<Product> shoppingCart;

    public void onCreate() {
        super.onCreate();
        fb = FinalBitmap.create(this);
        fb.configLoadingImage(R.drawable.default_image);
        fb.configDiskCachePath(Utils.getDiskCacheDir(this, "afinalCache").getAbsolutePath());// 配置缓存路径
        username = null;
        shoppingCart = new ArrayList<Product>();
    }
    public FinalBitmap getFinalBitmap() {
        return fb;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public List<Product> getShoppingCart() {
        return shoppingCart;
    }

    public void setShoppingCart(List<Product> shoppingCart) {
        this.shoppingCart = shoppingCart;
    }
}
